<?php
namespace   Admin\Model;
use         Think\Model\ViewModel;
class BillDetailViewModel extends ViewModel {
	public $viewFields = array(
        'order_apply'=>array('id','apply_number','apply_time','from_place','to_place',
            'status','tag',
            '_type'=>'LEFT'
        ),
        'order_apply_detail'=>array('p_name','p_phone',
		      '_on'=>'order_apply.id = order_apply_detail.apply_id',
              '_type'=>'LEFT'
        ),
        'order_apply_allot'=>array(
               '_on'=>'order_apply.id = order_apply_allot.apply_id',
               '_type'=>'LEFT'
        ),
        'order_allot'=>array('go_time',
                '_on'=>'order_apply_allot.allot_id = order_allot.id',
                '_type'=>'LEFT'
        ),
        'order_allot_detail'=>array('odometer','use_time','money',
                '_on'=>'order_allot.id = order_allot_detail.allot_id',
                '_type'=>'Left'
        ),
        'car'=>array('license_plate',
                '_on'=>'order_allot.car_id = car.id',
                '_type'=>'LEFT'
        ),
        'car_model'=>array('name',
                '_on'=>'car.model_id = car_model.id',
                '_type'=>'LEFT'
        ),
        'driver'=>array('real_name','phone_a',
                '_on'=>'order_allot.driver_id = driver.id',
                '_type'=>'LEFT'
        ),

	);
}
